package routers

import (
	"demo/controllers"
	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	//默认 beego
	beego.Router("/", &controllers.MainController{})
	//添加 form 表单
	beego.Router("/form", &controllers.GoodController{}, "get:Form")
	//执行添加
	beego.Router("/insert", &controllers.GoodController{}, "post:InsertGood")
	//列表展示
	beego.Router("/list", &controllers.GoodController{}, "get:ListGood")
	//删除
	beego.Router("/delete", &controllers.GoodController{}, "get:DeleteGood")
	//修改
	beego.Router("/update", &controllers.GoodController{}, "get:UpdateGood")

}
